export const hasPermi = {
    install (Vue) {
        Vue.directive('hasPermi', {
            bind (el, binding, vnode) {
                const permissionsNameList = JSON.parse(localStorage.getItem("permissionsList"));
                const permissions = permissionsNameList
                const value = binding.value
                let flag = true
                // for (const v of value) {
                //     if (!permissions.includes(v)) {
                //         flag = false
                //     }
                // }
                // if (!flag) {
                //     if (!el.parentNode) {
                //         el.style.display = 'none'
                //     } else {
                //         el.parentNode.removeChild(el)
                //     }
                // }
            }
        })
    }
}
